﻿/////////////////////////////////////////////////////////////////
//File: BlogManager.cs
//Description: 此文件是根据facade模式和接口隔离原则创建的。各个子业务之间的关联在这里建立。 
//            
//Copyright© 2011 Moliu
//History:
//  2011-3-26 18:11:20    CodeSmith5.0.1    Original Version
//  2011-3-26 19:26:20    Moliu             1
//  2011-4-17 13:13:15    Moliu             2
//  2011-4-23 12:21:49    Moliu             3
//  2011-4-22 22:10:12    Moliu             4
/////////////////////////////////////////////////////////////////
using System;
using MAF.CRUD;
using My.Blog.Domain.Entities;

namespace My.Blog.Business.Service
{
    public partial class ArticleSvc : BusinessCRUD<Article>,ICRUD<Article>
    {
       /// <summary>
       /// 构造函数
       /// </summary>
       /// <param name="module"></param>

        public ArticleSvc(string module) : base(StorageFactory.GetInstance(module).CreateArticle()) { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public void Add(Article info)
        {
            base.Add(info);
        }
        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public void Update(Article info)
        {
            info.CreatedOn = DateTime.Now;
            base.Update(info);
        }
 
        public int IncreaseCommentAmount(int id, int num)
        {
            return 0;// _Article.IncreaseCommentAmount(id, num);
        }

        public int IncreaseVisitedAmount(int id, int num)
        {
            return 0;// _Article.IncreaseVisitedAmount(id, num);
        }

        public int MoveArticleTo(string articleIds, int categoryId, int width)
        {
            return 0;// _Article.MoveArticleTo(articleIds, categoryId, width);
        }
 
    }
}
